<!DOCTYPE html>
<html>
<head>
<div th:include="base-libs :: base-libs" />
<script th:src="@{/tbxt/js/bbsh.js}"></script>
<title>卫生局月报-审核</title>


<meta name="content-type" content="text/html; charset=UTF-8">
	<style>
		body {
			background: #fff;
			overflow: hidden;
			text-align: center;
		}
		.laydate-icon{
		    line-height: 28px;
		    background-color: #fff;
		    height: 28px;
		    border: 1px solid #B6B6B6;
		    border-radius: 5px;
		    width:84% !important;
		}
		.titleTd{
			width:22%;
		}
	</style>
	<script>
		var bbshData = StoreCache.removeCache('bbshData');
		$(function(){
			$(this).registerManagerPage({cacheTables:["TB_ZY_BBZT"],callback: initView});
		})
		
		function initView(){
			//载入值域：Yyfs
			var yyfsArr = StoreCache.getCache('TB_ZY_YYFS');
			if(!$.isEmptyObject(yyfsArr)){
				var yyfsBox = $("#yyfsBox");
				var inputCss = "width:17px;display:inline-block;float:left";
				$.each(yyfsArr.data, function(i, item){
					var input = $("<input>").attr({style: inputCss, type: 'checkbox', name: 'YYFS_', value: item.XMDM});
					var div = $("<div>").css({'float':'left', 'margin-right': '8px'}).html(item.XMMC);
					yyfsBox.append(input,div)
				})
			}
			
			$("input").attr("disabled",'disabled');
			
			//审核不通过
			$("body").on('click','#btnShbtg',function(){
				checkPass();
			});
			
			//审核通过
			$("body").on('click','#btnShtg',function(){
				checkNoPass();
			});
			
			//返回
			$("body").on('click','#btnFh',function(){
				StoreCache.setCache('bbshTabIndex',1);
				$.QuickUrlUtils.redirectUrl("bbsh.html");
			});
			
			//审核记录
			$("body").on('click','#btnShjl',function(){
				StoreCache.setCache("BBID", bbshData.ID);
				openShjlView();
			});

            initData();
			
		}
		
		function initData(){
			queryDataByNowDate();
		}
		
		/** 通过当前时间查询数据  */
		function queryDataByNowDate(){
			if(!$.isEmptyObject(bbshData)){
				var NFYF = bbshData.YF;
				var NF = NFYF.substring(0,4),
					YF = NFYF.substring(4);
				var queryParams = {
					YLJGID: bbshData.YLJGID,
					NF: NF,
					YF: YF
				}
				var NFYF = NF + '-' + YF;
				$.QuickRemote.AjaxJson(contextRoot + "wsjyb/queryOne", queryDataByNowDateBack, queryParams, NFYF);
			}else{
				btnController();
			}
		}
		/** 通过当前时间查询数据--回调  */
		function queryDataByNowDateBack(result, NFYF){
			if(StringUtils.isEmpty(result.errInfo)){
				result.NFYF = NFYF;
				//按钮控制
				btnController(bbshData.ZT);
				
				var bbztArr = StoreCache.getCache("TB_ZY_BBZT");
                if(!$.isEmptyObject(bbztArr) && !$.isEmptyObject(bbztArr = bbztArr.data)){
                    var bbzt = "未填报";
                    $.each(bbztArr, function(i,item){
                        if(item.XMDM == bbshData.ZT){
                            result.ZTMC = item.XMMC;
                            return false;
                        }
                    })
                }

				$(".form-control").each(function(){
					var name = $(this).attr('name');
					$(this).val(result[name]).html(result[name]);
				})
				
				//勾选预约方式
				setYyfs();
				
				//查询年报数据（获取数据算出对应百分比）
				var queryParams = {YLJGID : bbshData.YLJGID, NF : NFYF.substring(0,4)}
				$.QuickRemote.AjaxJson(contextRoot + "wsjnb/queryNbInfo", function(re){
					//设置keyup事件，计算百分比
					var keyupParamArr = [
		                     ['QYZRS','x','QYL','',re.XQHJRKS],//签约率
		                     ['QYZDRQZS','x','ZDRQQYFGL','',re.ZDRQS],//重点人群签约覆盖率
		                     ['JCJZRC','JZRC','JCJZL'],//基层就诊率
		                     ['QYJCJZRC','JCJZRC','QYJCJZL'],//签约基层就诊率
		                     ['XYNJZRC','JZRC','XYNJZL'],//县域内就诊率
		                     ['QYXYNJZRC','JZRC','QYXYNJZL'],//签约县域内就诊率
		                     ['ZYXZRC','ZYXZLYRC','ZYXZLYL'], //住院下转履约率
		                     ['XZLYRC','XZRC','XZLYL'],	//下转履约率
		                     ['MZSZLYRC','MZSZRC','MZSZLYL'],//门诊上转履约率
		                     ['ZYSZLYRC','ZYSZRC','ZYSZLYL'],//住院上转履约率
					];
					setKeyupFun(keyupParamArr);
				}, queryParams);
			}else{
				$.QuickAlert.alertFail({content: result.errInfo});
			}
		}
		
	</script>
</head>

<body class="easyui-layout">
<form id="myForm" action="save" >
	<div region="north" style="height:60px;border:0;border-bottom:1px solid #ddd;overflow:hidden">
		<table class="form-table">
			<tr>
				<td class="td-text">审核状态：</td>
				<td class="td-content">
					<input name="ZTMC" class="form-control"/>
				</td>
				<td class="td-text">机构名称：</td>
				<td class="td-content">
					<input name="JGMC" class="form-control" />
				</td>
				<td class="td-text"><label>月份：</label></td>
				<td class="td-content">
					<input class="form-control laydate-icon" name="NFYF" onclick="WdatePicker({dateFmt:'yyyy-MM',onpicking:queryDataByNowDate})" 
						quick-config="label:'月份', validateProxy:'notNull'"/>
				</td>
				<td>
					<button id="btnShjl" class="btn btn-info" type="button">审核记录</button>
				</td>
			</tr>
		</table>
	</div>
	<div region="center" border="false" style="overflow-x:hidden;">
		<div class="easyui-panel" title="一、家庭医生签约情况" border="false" style="width:99.9%">
			<table class="form-table">
				<tr>
					<td class="td-text titleTd"><label>1.家庭医生团队数：</label></label></td>
					<td class="td-content">
						<input name="JTYSTDS" class="form-control" 
						quick-config="label:'家庭医生团队数', validateProxy:'notNull length num', length: '10'"/>
					</td>
					<td class="td-text titleTd"><label>2.团队家庭医生数：</label></td>
					<td class="td-content">
						<input name="TDJTYSS" class="form-control" 
						quick-config="label:'团队家庭医生数', validateProxy:'notNull length num', length: '10'"/>
					</td>
				</tr>
				<tr>
					<td class="td-text"><label>3.团队护士数：</label></td>
					<td class="td-content">
						<input name="TDHSS" class="form-control" 
						quick-config="label:'团队护士数', validateProxy:'notNull length num', length: '10'"/>
					</td>
					<td class="td-text"><label>4.团队多点执业医师数：</label></td>
					<td class="td-content">
						<input name="TDDDZYYSS" class="form-control" 
						quick-config="label:'团队多点执业医师数', validateProxy:'notNull length num', length: '10'"/>
					</td>
				</tr>
				<tr>
					<td class="td-text"><label>5.签约总人数</label>/本期新增签约人数：</td>
					<td class="td-content">
						<input id="QYZRS" name="QYZRS" class="form-control" style="width:40%;" 
						quick-config="label:'签约总人数', validateProxy:'notNull length num', length: '10'"/>
						
						<span style="display:inline-block;width:7.5%;text-align:center;">/</span>
						
						<input name="BQXZQYRS" class="form-control" style="width:40%;" 
						quick-config="label:'本期新增签约人数', validateProxy:'notNull length num', length: '10'"/>
					</td>
					<td class="td-text"><label>6.签约率：</td>
					<td class="td-content">
						<input id="QYL" name="QYL" readonly="readonly" class="form-control" placeholder="签约总人数/辖区内户籍人口数"/>
					</td>
				</tr>
				<tr>
					<td class="td-text"><label>7.签约重点人群总数</label>/本期新增签约数：</td>
					<td class="td-content">
						<input id="QYZDRQZS" name="QYZDRQZS" class="form-control" style="width:40%;" 
						quick-config="label:'签约重点人群总数', validateProxy:'notNull length num', length: '10'"/>
						
						<span style="display:inline-block;width:7.5%;text-align:center;">/</span>
						
						<input name="BQXZZDRQQYS" class="form-control" style="width:40%;" 
						quick-config="label:'本期新增签约数', validateProxy:'notNull length num', length: '10'"/>
					</td>
					<td class="td-text">8.重点人群签约覆盖率：</td>
					<td class="td-content">
						<input id="ZDRQQYFGL" name="ZDRQQYFGL" readonly="readonly" class="form-control" placeholder="重点人群签约总人数/辖区内重点人群数"/>
					</td>
				</tr>
			</table>
		</div>
		<div class="easyui-panel" title="二、慢病规范化管理情况" border="false" style="width:99.9%">
			<table class="form-table">
				<tr>
					<td class="td-text titleTd"><label>1.高血压患者规范管理数：</label></td>
					<td class="td-content">
						<input name="GXYHZGFGLS" class="form-control" 
						quick-config="label:'高血压患者规范管理数', validateProxy:'notNull length num', length: '10'"/>
					</td>
					<td class="td-text titleTd"><label>2.糖尿病患者规范管理数：</label></td>
					<td class="td-content">
						<input name="TNBHZGFGLS" class="form-control" 
						quick-config="label:'糖尿病患者规范管理数', validateProxy:'notNull length num', length: '10'"/>
					</td>
				</tr>
				<tr>
					<td class="td-text"><label>3.高血压签约患者规范管理数：</label></td>
					<td class="td-content">
						<input name="GXYQYHZGFGLS" class="form-control" 
						quick-config="label:'高血压签约患者规范管理数', validateProxy:'notNull length num', length: '10'"/>
					</td>
					<td class="td-text"><label>4.糖尿病签约患者规范管理数：</label></td>
					<td class="td-content">
						<input name="TNBQYHZGFGLS" class="form-control" 
						quick-config="label:'糖尿病签约患者规范管理数', validateProxy:'notNull length num', length: '10'"/>
					</td>
				</tr>
			</table>
	
		</div>
	
		<div class="easyui-panel" title="三、就诊及转诊情况" border="false" style="width:99.9%">
			<table class="form-table">
				<tr>
					<td class="td-text titleTd"><label>1.就诊人次：</label></td>
					<td class="td-content">
						<input id="JZRC" name="JZRC" class="form-control" 
						quick-config="label:'就诊人次', validateProxy:'notNull length num', length: '10'"/>
					</td>
					<td class="td-text titleTd"><label>2.签约就诊人次：</label></td>
					<td class="td-content">
						<input name="QYJZRC" class="form-control" 
						quick-config="label:'签约就诊人次', validateProxy:'notNull length num', length: '10'"/>
					</td>
				</tr>
				<tr>
					<td class="td-text"><label>3.基层就诊人次</label>/签约基层就诊人次：</td>
					<td class="td-content">
						<input id="JCJZRC" name="JCJZRC" class="form-control" style="width:40%;" 
						quick-config="label:'基层就诊人次', validateProxy:'notNull length num', length: '10'"/>
						
						<span style="display:inline-block;width:7.5%;text-align:center;">/</span>
						
						<input id="QYJCJZRC" name="QYJCJZRC" class="form-control" style="width:40%;" 
						quick-config="label:'签约基层就诊人次', validateProxy:'notNull length num', length: '10'"/>
					</td>
					<td class="td-text"><label>4.县域内就诊人次</label>/签约县域内就诊人次：</td>
					<td class="td-content">
						<input id="XYNJZRC" name="XYNJZRC" class="form-control" style="width:40%;" 
						quick-config="label:'县域内就诊人次', validateProxy:'notNull length num', length: '10'"/>
						
						<span style="display:inline-block;width:7.5%;text-align:center;">/</span>
						
						<input id="QYXYNJZRC" name="QYXYNJZRC" class="form-control" style="width:40%;" 
						quick-config="label:'签约县域内就诊人次', validateProxy:'notNull length num', length: '10'"/>
					</td>
				</tr>
				<tr>
					<td class="td-text"><label>5.基层就诊率：</label></td>
					<td class="td-content">
						<input id="JCJZL" name="JCJZL" readonly="readonly" class="form-control" placeholder="基层就诊人次/就诊人次"
						quick-config="label:'基层就诊率', validateProxy:'notNull length', length: '10'"/>
					</td>
					<td class="td-text"><label>6.签约基层就诊率：</label></td>
					<td class="td-content">
						<input id="QYJCJZL" name="QYJCJZL" readonly="readonly" class="form-control" placeholder="签约基层就诊人次/基层就诊人次"
						quick-config="label:'签约基层就诊率', validateProxy:'notNull length', length: '10'"/>
					</td>
				</tr>
				<tr>
					<td class="td-text"><label>7.县域内就诊率：</label></td>
					<td class="td-content">
						<input id="XYNJZL" name="XYNJZL" readonly="readonly" class="form-control" placeholder="县域内就诊人次/就诊人次"
						quick-config="label:'县域内就诊率', validateProxy:'notNull length', length: '10'"/>
					</td>
					<td class="td-text"><label>8.签约县域内就诊率：</label></td>
					<td class="td-content">
						<input id="QYXYNJZL" name="QYXYNJZL" readonly="readonly" class="form-control" placeholder="签约县域内就诊人次/就诊人次"
						quick-config="label:'签约县域内就诊率', validateProxy:'notNull length', length: '10'"/>
					</td>
				</tr>
				<tr>
					<td class="td-text" style="vertical-align:middle"><label>9.预约人次：</label></td>
					<td class="td-content" style="vertical-align:middle">
						<input name="YYRC" class="form-control" 
						quick-config="label:'预约人次', validateProxy:'notNull length num', length: '10'"/>
					</td>
					<td class="td-text" style="vertical-align:middle">
						<label>10.预约方式：</label>
						<input class="form-control"  name="YYFS" id="YYFS"  style="display:none" hidden="hidden"
						quick-config="label:'预约方式', validateProxy:'notNull'" cacheTable="TB_ZY_YYFS"/>
					</td>
					<td class="td-content" style="vertical-align:middle" id="yyfsBox">
					</td>
				</tr>
				<tr>
					<td class="td-text"><label>11.住院下转人次</label>/住院下转履约人次：</td>
					<td class="td-content">
						<input id="ZYXZRC" name="ZYXZRC" class="form-control" style="width:40%;" 
						quick-config="label:'住院下转人次', validateProxy:'notNull length num', length: '10'"/>
						
						<span style="display:inline-block;width:7.5%;text-align:center;">/</span>
						
						<input id="ZYXZLYRC" name="ZYXZLYRC" class="form-control" style="width:40%;" 
						quick-config="label:'住院下转履约人次', validateProxy:'notNull length num', length: '10'"/>
					</td>
					<td class="td-text"><label>12.住院下转履约率：</label></td>
					<td class="td-content">
						<input id="ZYXZLYL" readonly="readonly" name="ZYXZLYL" class="form-control" placeholder="住院下转履约人次/住院下转人次"/>
					</td>
				</tr>
				<tr>
					<td class="td-text"><label>13.下转人次 </label>/下转履约人次：</td>
					<td class="td-content">
						<input id="XZRC" name="XZRC" class="form-control" style="width:40%;" 
						quick-config="label:'下转人次 ', validateProxy:'notNull length num', length: '10'"/>
						
						<span style="display:inline-block;width:7.5%;text-align:center;">/</span>
						
						<input id="XZLYRC" name="XZLYRC" class="form-control" style="width:40%;" 
						quick-config="label:'下转履约人次', validateProxy:'notNull length num', length: '10'"/>
					</td>
					<td class="td-text"><label>14.下转履约率：</label></td>
					<td class="td-content">
						<input id="XZLYL" name="XZLYL" readonly="readonly" class="form-control" placeholder="下转履约人次/下转人次"/>
					</td>
				</tr>
				<tr>
					<td class="td-text"><label>15.门诊上转人次</label>/门诊上转履约人次：</td>
					<td class="td-content">
						<input id="MZSZRC" name="MZSZRC" class="form-control" style="width:40%;" 
						quick-config="label:'门诊上转人次', validateProxy:'notNull length num', length: '10'"/>
						
						<span style="display:inline-block;width:7.5%;text-align:center;">/</span>
						
						<input id="MZSZLYRC" name="MZSZLYRC" class="form-control" style="width:40%;" 
						quick-config="label:'门诊上转履约人次', validateProxy:'notNull length num', length: '10'"/>
					</td>
					<td class="td-text">16.门诊上转履约率：</td>
					<td class="td-content">
						<input id="MZSZLYL" name="MZSZLYL" readonly="readonly" class="form-control" placeholder="门诊上转履约人次/门诊上转人次"/>
					</td>
				</tr>
				<tr>
					<td class="td-text"><label>17.住院上转人次</label>/住院上转履约人次：</td>
					<td class="td-content">
						<input id="ZYSZRC" name="ZYSZRC" class="form-control" style="width:40%;" 
						quick-config="label:'住院上转人次', validateProxy:'notNull length num', length: '10'"/>
						
						<span style="display:inline-block;width:7.5%;text-align:center;">/</span>
						
						<input id="ZYSZLYRC" name="ZYSZLYRC" class="form-control" style="width:40%;" 
						quick-config="label:'住院上转履约人次', validateProxy:'notNull length num', length: '10'"/>
					</td>
					<td class="td-text">18.住院上转履约率：</td>
					<td class="td-content">
						<input id="ZYSZLYL" name="ZYSZLYL" readonly="readonly" class="form-control" placeholder="住院上转履约人次/住院上转人次"/>
					</td>
				</tr>
			</table>
		</div>
		<div class="easyui-panel" title="四、医联体建设情况" border="false" style="width:99.9%">
			<table class="form-table">
			<tr>
				<td class="td-text titleTd"><label>1.下派医生总人数：</label></td>
				<td class="td-content">
					<input name="XPYSZRS" class="form-control" 
					quick-config="label:'下派医生总人数', validateProxy:'notNull length num', length: '10'"/>
				</td>
				<td class="td-text titleTd"><label>2.下派医生总天数：</label></td>
				<td class="td-content">
					<input name="XPYSZTS" class="form-control" 
					quick-config="label:'下派医生总天数', validateProxy:'notNull length num', length: '10'"/>
				</td>
			</tr>
			<tr>
				<td class="td-text"><label>3.下派医生门诊总人次：</label></td>
				<td class="td-content">
					<input name="XPYSMZZRC" class="form-control" 
					quick-config="label:'下派医生门诊总人次', validateProxy:'notNull length num', length: '10'"/>
				</td>
				<td class="td-text"><label>4.下派医生手术总人次：</label></td>
				<td class="td-content">
					<input name="XPYSSSZRC" class="form-control" 
					quick-config="label:'下派医生手术总人次', validateProxy:'notNull length num', length: '10'"/>
				</td>
			</tr>
			<tr>
				<td class="td-text"><label>5.下派医生查房总次数：</label></td>
				<td class="td-content">
					<input name="XPYSCFZCS" class="form-control" 
					quick-config="label:'下派医生查房总次数', validateProxy:'notNull length num', length: '10'"/>
				</td>
				<td class="td-text"><label>6.接收进修人数：</label></td>
				<td class="td-content">
					<input name="JSJXRS" class="form-control" 
					quick-config="label:'接收进修人数', validateProxy:'notNull length num', length: '10'"/>
				</td>
			</tr>
			<tr>
				<td class="td-text"><label>7.举办讲座次数：</label></td>
				<td class="td-content">
					<input name="JBJZCS" class="form-control" 
					quick-config="label:'举办讲座次数', validateProxy:'notNull length num', length: '10'"/>
				</td>
				<td class="td-text"><label>8.培训人次：</label></td>
				<td class="td-content">
					<input name="PXRC" class="form-control" 
					quick-config="label:'培训人次', validateProxy:'notNull length num', length: '10'"/>
				</td>
			</tr>
			<tr>
				<td class="td-text"><label>9.联合病房数：</label></td>
				<td class="td-content">
					<input name="LHBFS" class="form-control" 
					quick-config="label:'联合病房数', validateProxy:'notNull length num', length: '10'"/>
				</td>
				<td class="td-text"><label>10.病区床位数：</label></td>
				<td class="td-content">
					<input name="BQCWS" class="form-control" 
					quick-config="label:'病区床位数', validateProxy:'notNull length num', length: '10'"/>
				</td>
			</tr>
			</table>
	
		</div>
	</div>
</form>	
	<div region="south" id="south" style="height:45px;line-height:40px;text-align:center;border:0;border-top:1px solid #ddd">
	</div>
</body>
<script type="text/html" id="shBtnBox">
	<button id="btnShbtg" class="btn btn-info" type="button">审核不通过</button>
	<button id="btnShtg" class="btn btn-info" type="button">审核通过</button>
	<button id="btnFh" class="btn btn-info" type="button">返回</button>
</script>
</html>
